package com.gudaichaoren.spider.constant;


import java.util.HashMap;
import java.util.Map;

/**
 * 系统级常量
 * @author 188****7252
 * @date 2019/12/14 14:04
 */
public interface Constants {

    /**
     * 系统级响应对象
     * @author 188****7252
     * @date 2019/12/14 14:04
     */
    enum Response implements IResponseStatus {
        SUCCESS(200, "请求成功"),
        FAILURE(1000, "请求失败"),
        DATA_EMPTY(1001, "未找到目标资源"),
        BAD_REQUEST(1002, "非法请求"),
        BAD_PARAMETER(1003,"请求参数异常"),
        FIELD_NOT_ALLOWED_EMPTY(1004, "%s不能为空"),
        SEND_MESSAGE_ERROR(1005,"发送短信失败"),
        VERIFY_CODE_ERROR(1006,"验证码验证失败"),
        USER_PWD_ERROR(1007,"账号或密码错误"),
        NO_TOKEN_ERROR(1008,"token为空"),
        BAD_TOKEN_ERROR(1009,"token无效"),
        MODIFY_PWD_ERROR(1010,"修改密码错误"),
        STORE_ORDER_PAY_ERROR(1011,"商户订单支付失败")
        ;

        private Integer code;

        private String message;

        Response(Integer code, String message) {
            this.code = code;
            this.message = message;
        }

        @Override
        public Integer getCode() {
            return code;
        }

        @Override
        public String getMessage() {
            return message;
        }
    }

    /**
     * redis constants
     */
    class RedisConstant {
        public static final String USER_LOGIN_VERIFY_PREFIX = "spider:user:verify:";
        public static final String USER_MODIFY_LOGIN_PWD_PREFIX = "spider:user:verify:";
        public static final String USER_MODIFY_PAY_PWD_PREFIX = "spider:user:verify:";
        public static final String USER_TOKEN_PREFIX = "spider:user:authorization:";
        public static final String INTEGRAL_HTML = "spider:integral:html";
    }

    /**
     * 双色球奖项
     */
    class LotteriesShuangseAwards {
        public static final String FIRST_PRIZE = "一等奖";
        public static final String SECOND_PRIZE = "二等奖";
        public static final String THIRD_PRIZE = "三等奖-3000元";
        public static final String FOURTH_PRIZE = "四等奖-200元";
        public static final String FIFTH_PRIZE = "五等奖-10元";
        public static final String SIXTH_PRIZE = "六等奖-5元";
    }

    enum LotteriesShuangseAnalysisTypeEnum{
        出现总次数(1,"100期出现总次数"),
        平均遗漏值(2,"100期平均遗漏次数"),
        最大遗漏值(3,"100期最大遗漏次数"),
        最大连出值(4,"100期最大连出次数"),
        当前遗漏(5,"当前遗漏次数")
        ;

        private int code;

        private String message;

        LotteriesShuangseAnalysisTypeEnum(int code, String message) {
            this.code = code;
            this.message = message;
        }

        public int getCode() {
            return code;
        }

        public String getMessage() {
            return message;
        }
    }

}